﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Transport.Communication;
using iLangl.Model;
using iLangl.BusinessModel.Managers;

namespace iLangl.BusinessModel.Actions.Customers
{
	public class UpdateCompanyInfo : BaseTPAction
	{
		public UpdateCompanyInfo()
			: base()
		{
			ResponseContext = new CompanyResponseContext();
			RequestContext = new ActionResultRequestContext();
		}


		protected override void _execute()
		{
			PluginLicense license = PluginManager.Instance.GetLicense(PluginLiceneKey);

			Company company = (Company)ResponseContext.GetContext();

			CompanyManager.Instance.UpdateCompanyInfo(company);

			ActionResult result = new ActionResult();
			RequestContext.SetContext(result);
		}


		protected override string GetName()
		{
			return "UpdateCompanyInfo";
		}

		protected override string GetVersion()
		{
			return "1";
		}
	}
}
